package com.cy.pj.common.vo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Author YuBaoFu
 * @create 2025/06/03
 * @description
 */
@Data
@NoArgsConstructor
public class PageObject<T> {

    private Integer pageCurrent = 1;
    private Integer pageSize = 2;
    private Integer rowCount = 0;
    private Integer pageCount = 0;
    private List<T> records;

    public PageObject(Integer pageCurrent,Integer pageSize,Integer rowCount,List records){
        this.pageCurrent = pageCurrent;
        this.pageSize  = pageSize;
        this.rowCount = rowCount;
        this.records = records;
        this.pageCount = (rowCount-1) / pageSize + 1;
    }

}
